package com.example.app_back.convert;

import com.example.app_back.dao.User;
import com.example.app_back.dto.AddUserDto;
import com.example.app_back.dto.GetUserDto;

public class UserConverter {
    public static GetUserDto convertUser(User user){
        GetUserDto userDto=new GetUserDto();
        userDto.setId(user.getId());
        userDto.setName(user.getUserName());
        return userDto;
    }
    public static  User convertUser(AddUserDto adduserdto){
        User user=new User();
        user.setUserName(adduserdto.getName());
        user.setPassword(adduserdto.getPassword());
        return user;
    }
}
